Skip to content

Bulk monitors guide #1338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Bulk monitors guide #1338

wants to merge 26 commits into from

Conversation

serverless-mom
Copy link
Contributor

@serverless-mom serverless-mom commented Aug 1, 2025

This version is not current, the updated version of this article is on Notion

Affected Components

  • Content & Marketing
  • Pricing
  • Test
  • Docs
  • Learn
  • Other

I'm not fully in love with the formatting of the middle section, where I comment on individual code lines, maybe I should just rewrite as being comments inside the code snippet. LMK what you think.

Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
checklyhq-com Ready Preview Comment Aug 13, 2025 9:30pm

@Dgiordano33
Copy link
Collaborator

Dgiordano33 commented Aug 5, 2025

@serverless-mom

  • Please update the title, we talked about this one being pretty sophmoric
  • please stop using "pinger" anywhere. It's a monitor or check.
  • This was tough to follow. Idk about starting with a huge TLDR that was basically the post.
  • Go through the construct, talk about what we're placing with dynamic values. The URL and the ID. Talk about why and how they need to be unique.
  • Then go through the examples of what you can do by replacing each. Drive from a list in the same file, drive from a CSV or JSON file, drive from a dynamic sitemap that gets fetched.
  • Show how you can offload some of the config options from the test spec into a group or global file so that this stays cleaner.

Copy link
Contributor

@guolau guolau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, short, and simple demonstration of what the CLI is capable of. The sitemap example is pretty neat!

I'd agree with Dan that this is somewhat hard to follow. Especially for users who are new to Checkly and MaC, I can see them being somewhat lost or intimidated. I think it'd be easier to follow if it were broken down more into steps, ex:

  • First, we need URLs to monitor. Here is a list of URLs, or a JSON file, or parse your sitemap!
  • Next, let's create the URL monitor construct. Here's what these properties mean, and here are links to the documentation.
  • Here is what the completed code looks like
  • Then we deploy. Now all the monitors are in Checkly
  • Next steps/conclusion

Of course, just my 2 cents.

title: Monitor 500 pages in 2 minutes with Checkly
displayTitle: Monitor 500 pages in 2 minutes with Checkly
description: >-
By leveraging arrays, sitemap parsing, and dynamic monitor creation, you can ensure comprehensive coverage of your website, API routes, and third-party services—all from a single configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: should we remove the part about third-party services? From a support POV, we recommend not monitoring sites you don't control (you can't fix it if it goes down, it can change at any moment, and third-parties have every right to block this kind of traffic)


## Next Steps: Grouping, and More Advanced Checks

With all of our monitors managed with a single file, we can update their configuration just by changing the values in the `new UrlMonitor` block above. However, as we have more detailed and nuanced monitoring, it would be nice to have a single place to manage configuration for timing, alerting, and notification channels for a group of checks. All of that is possible with Checkly Groups.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Might be good to add a link to the groups doc here. https://www.checklyhq.com/docs/groups/


If these look correct, you’re ready to run `npx checkly deploy` and create your new monitors!

## Next Steps: Grouping, and More Advanced Checks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth mentioning the global config file here as well?

@@ -10,6 +10,7 @@ menu:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have: A short intro sentence briefly summarizing the use case behind this. For example "When working with AI IDEs, you can provide them with context on Checkly, which enables automated generation of Checkly constructs, helping you speed up your monitor creation workflow."

Also: As a reader it'll be interesting to know if I can chose from one of the options listed below or if its recommended to provide as much context as possible e.g. reference the docs site + download the custom rules.

})
```

This takes an array of URLs and creates a new monitor with a unique ID and name. We can test run these tests with `npx checkly test` and both monitors will run in our CLI’s default region.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something but its unclear to me what to do with this file. Where does it live? Where do the generated monitors land? How can I execute it?


## Next Steps: Grouping, and More Advanced Checks

With all of our monitors managed with a single file, we can update their configuration just by changing the values in the `new UrlMonitor` block above. However, as we have more detailed and nuanced monitoring, it would be nice to have a single place to manage configuration for timing, alerting, and notification channels for a group of checks. All of that is possible with Checkly Groups.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Laura, we should either link to the groups construct here or add an example code snippet below. Otherwise its a little unclear how to act on this.

@@ -0,0 +1,204 @@
---
title: Monitor 500 pages in 2 minutes with Checkly
displayTitle: Monitor 500 pages in 2 minutes with Checkly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the headline slightly misleading when reading it for the first time. "Creating monitors" would be more tangible if we want to be explicit.

const urlPath = new URL(url).pathname.replace(/\//g, '-').replace(/^-+|-+$/g, '') || 'root'
```

Depending on how you format your input array, this cleanup step may be unnecessary.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be helpful to provide more context on what this cleanup step does so I can understand whether I need it or not.

@serverless-mom serverless-mom marked this pull request as draft August 12, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants